# -*-encoding: utf-8 -*-
from celery import Celery
from yxproject.views.utils.DB.PostgreSQL import PostgreCRUD

app = Celery('task', broker='redis://:lczgywzyy@localhost:16379/0')

@app.task
def commit(a):
    sql_insert = "INSERT INTO component(component_name) values('%s');"
    resultSelect = PostgreCRUD.insertImpl(sql_insert, str(a))
    return resultSelect
